
import chalk from 'chalk'

interface Logger {
  (log: string): void;
  warn: (log: string) => void;
  success: (log: string) => void;
  error: (log: string) => void;
}

export const logger: Logger = (log: string) => {
  console.log(log)
}

logger.warn = (log: string) => {
  console.log(chalk.yellow(log))
}
logger.success = (log: string) => {
  console.log(chalk.green(log))
}
logger.error = (log: string) => {
  console.log(chalk.red(log))
}
